home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / fortran / libry51.zip / LIBRY4A.DOC < prev    next >
Text File  |  1989-11-10  |  12KB  |  375 lines

  1. .pa
  2.                   QUICK LIST OF MATHEMATICAL FUNCTIONS
  3.  
  4. AERF..... arc-error function
  5. APOLY.... area of a polygon
  6. BETA..... complete beta function
  7. BETAR.... incomplete beta function
  8. BINML.... binomial coefficient
  9. BINMLD... double precision form of BINML
  10. CHEBY.... Chebyshev polynomial of N-th degree
  11. DERF..... double precision error function
  12. DERFC.... double precision complementary error function
  13. DEXPI.... double precision exponential integral
  14. DWSN..... Dawson's integral
  15. ERF...... error function
  16. ERFC..... complementary error function
  17. EXPI..... exponential integral
  18. FACT..... factorial
  19. FGQ0I.... numerical integration from zero to infinity
  20. FGQ0ID... double precision form of FGI0I
  21. FGQ1..... numerical integration over definite interval
  22. FGQ1D.... double precision form of FGQ1
  23. FGQ2..... numerical integration over definite interval in 2 dimensions
  24. FGQ2D.... double precision form of FGQ2
  25. FGQ3..... numerical integration over definite interval in 3 dimensions
  26. FGQ3D.... double precision form of FGQ3
  27. FPG...... normal probability distribution in percent
  28. FRF...... cubic error function
  29. FTC95.... Student's T-distribution for 95% confidence
  30. GAMAL.... natural log of the Gamma function for large values
  31. GAMMA.... Gamma function
  32. GXNYM.... numerical integration of X**N*Y**M*dXdY over polygonal region
  33. IRAND.... random number generator (integer)
  34. PLG0..... Legendre polynomial of N-th degree
  35. PLG1..... Legendre polynomial of N-th degree (first derivative)
  36. PLG2..... Legendre polynomial of N-th degree (second derivative)
  37. PLG3..... Legendre polynomial of N-th degree (third derivative)
  38. PPLG0.... Legendre polynomial of N-th degree in 2 dimensions
  39. RPQ...... rational polynomial evaluation
  40. RPQD..... double precision form of RPQ
  41. SEVAL.... cubic spline evaluation
  42. XRAND.... random number generator (real, normally distributed)
  43. .pa
  44.                             MATHEMATICAL FUNCTIONS
  45.  
  46.  
  47. NAME:     AERF
  48. PURPOSE:  arc-error function
  49. TYPE:     REAL*4 function (far external)
  50. SYNTAX:   X=AERF(E)
  51. INPUT:    E (REAL*4) the erf of something
  52. OUTPUT:   X (REAL*4) the arc-erf
  53.  
  54.  
  55. NAME:     APOLY
  56. PURPOSE:  area of a polygon
  57. TYPE:     REAL*4 function (far external)
  58. SYNTAX:   A=APOLY(X,Y,N)
  59. INPUT:    X,Y (REAL*4) an array of points (X,Y)
  60. OUTPUT:   A (REAL*4) the area enclosed
  61. NOTE:     points must be in the order you draw a "connect-the-dots"
  62.           picture, the connection between the last point and the first
  63.           point is assumed (e.g. for a triangular region N=3)
  64.  
  65.  
  66. NAME:     BETA
  67. PURPOSE:  complete beta function
  68. TYPE:     REAL*4 function (far external)
  69. SYNTAX:   B=BETA(X,Y)
  70. INPUT:    X,Y (REAL*4)
  71. OUTPUT:   B (REAL*4)
  72.  
  73.  
  74. NAME:     BETAR
  75. PURPOSE:  incomplete beta function
  76. TYPE:     REAL*4 function (far external)
  77. SYNTAX:   B=BETAR(X,Y,R)
  78. INPUT:    X,Y,R (REAL*4)
  79. OUTPUT:   B (REAL*4)
  80.  
  81.  
  82. NAME:     BINML
  83. PURPOSE:  binomial coefficient
  84. TYPE:     REAL*4 function (far external)
  85. SYNTAX:   B=BINML(N,I)
  86. INPUT:    N,I (INTEGER*2)
  87. OUTPUT:   B (REAL*4)
  88.  
  89.  
  90. NAME:     CHEBY
  91. PURPOSE:  Chebyshev polynomial of N-th degree
  92. TYPE:     REAL*4 function (far external)
  93. SYNTAX:   C=CHEBY(N,X)
  94. INPUT:    X (REAL*4), N (INTEGER*2)
  95. OUTPUT:   C (REAL*4)
  96.  
  97.  
  98. NAME:     DWSN
  99. PURPOSE:  Dawson's integral
  100. TYPE:     REAL*4 function (far external)
  101. SYNTAX:   D=DWSN(X)
  102. INPUT:    X (REAL*4)
  103. OUTPUT:   D (REAL*4)
  104.  
  105.  
  106. NAME:     ERF
  107. PURPOSE:  error function
  108. TYPE:     REAL*4 function (far external)
  109. SYNTAX:   E=ERF(X)
  110. INPUT:    X (REAL*4)
  111. OUTPUT:   E (REAL*4)
  112. NOTE:     for double precision use DERF
  113.  
  114.  
  115. NAME:     ERFC
  116. PURPOSE:  complementary error function
  117. TYPE:     REAL*4 function (far external)
  118. SYNTAX:   E=ERFC(X)
  119. INPUT:    X (REAL*4)
  120. OUTPUT:   E (REAL*4)
  121. NOTE:     for double precision use DERFC
  122.  
  123.  
  124. NAME:     EXPI
  125. PURPOSE:  exponential integral (Abramowitz & Stegun use the notation E1(X) in
  126.           their NBS publication  "Handbook of Mathematical Functions"; it is
  127.           also called the "Theis Well Function" by groundwater folks; it is
  128.           the integral from X to infinity of EXP(-X)/X dX.)
  129. TYPE:     REAL*4 function (far external)
  130. SYNTAX:   E=EXPI(X)
  131. INPUT:    X (REAL*4)
  132. OUTPUT:   E (REAL*4)
  133. NOTE:     for double precision use DEXPI
  134.  
  135.  
  136. NAME:     FACT
  137. PURPOSE:  factorial
  138. TYPE:     REAL*4 function (far external)
  139. SYNTAX:   F=FACT(N)
  140. INPUT:    N (INTEGER*2)
  141. OUTPUT:   F (REAL*4)
  142.  
  143.  
  144. NAME:     FGQ0I (note the "0" (zero))
  145. PURPOSE:  numerical integration from zero to infinity
  146. TYPE:     REAL*4 function (far external)
  147. SYNTAX:   FI=FGQ0I(F)
  148. INPUT:    F (REAL*4 function) that YOU MUST SUPPLY and must be
  149.           called by the sequence FX=F(X)
  150. OUTPUT:   the integral
  151. NOTE:     for double precision use FGQ0ID
  152.           20-point Gauss quadrature is used (96-point for double
  153.           precision)
  154.  
  155.  
  156. NAME:     FGQ1
  157. PURPOSE:  numerical integration over definite interval
  158. TYPE:     REAL*4 function (far external)
  159. SYNTAX:   FI=FGQ1(F,A,B)
  160. INPUT:    A,B (REAL*4) interval over which to integrate
  161.           F (REAL*4 function) that YOU MUST SUPPLY and must be
  162.           called by the sequence FX=F(X)
  163. OUTPUT:   the integral
  164. NOTE:     your function will be integrated from A to B
  165.           for double precision use FGQ1D
  166.           20-point Gauss quadrature is used (96-point for double
  167.           precision)
  168.  
  169.  
  170. NAME:     FGQ2
  171. PURPOSE:  numerical integration over definite interval in 2-D
  172. TYPE:     REAL*4 function (far external)
  173. SYNTAX:   FI=FGQ2(F,FY1,FY2,A,B)
  174. INPUT:    A,B (REAL*4) interval over which to integrate F
  175.           F (REAL*4 function) that YOU MUST SUPPLY and must be
  176.           called by the sequence FXY=F(X,Y)
  177.           FY1 (REAL*4 function) that YOU MUST SUPPLY and must be
  178.           called by the sequence Y1=FY1(X)
  179.           FY2 (REAL*4 function) that YOU MUST SUPPLY and must be
  180.           called by the sequence Y2=FY2(X)
  181. OUTPUT:   the integral
  182. NOTE:     your function will be integrated in X from A to B and Y
  183.           from FY1(X) to FY2(X), 20*20=400 point Gauss quadrature
  184.           is used (96*96=9216 points for double precision)
  185.           for double precision use FGQ2D
  186.  
  187.  
  188. NAME:     FGQ3
  189. PURPOSE:  numerical integration over definite interval in 3-D
  190. TYPE:     REAL*4 function (far external)
  191. SYNTAX:   FI=FGQ3(F,FZ1,FZ2,FY1,FY2,A,B)
  192. INPUT:    A,B (REAL*4) interval over which to integrate F
  193.           F (REAL*4 function) that YOU MUST SUPPLY and must be
  194.           called by the sequence FXYZ=F(X,Y,Z)
  195.           FY1 (REAL*4 function) that YOU MUST SUPPLY and must be
  196.           called by the sequence Y1=FY1(X)
  197.           FY2 (REAL*4 function) that YOU MUST SUPPLY and must be
  198.           called by the sequence Y2=FY2(X)
  199.           FZ1 (REAL*4 function) that YOU MUST SUPPLY and must be
  200.           called by the sequence Z1=FZ1(X,Y)
  201.           FZ2 (REAL*4 function) that YOU MUST SUPPLY and must be
  202.           called by the sequence Z2=FZ2(X,Y)
  203. OUTPUT:   the integral
  204. NOTE:     your function will be integrated in X from A to B and Y
  205.           from FY1(X) to FY2(X) and Z from FZ1(X,Y) to FZ2(X,Y)
  206.           20*20*20=8000 point Gauss quadrature is used (96*96*96=884736
  207.           for double precision)
  208.           for double precision use FGQ3D
  209.  
  210.  
  211. NAME:     FPG
  212. PURPOSE:  normal probability distribution in percent
  213. TYPE:     REAL*4 function (far external)
  214. SYNTAX:   F=FPG(XBAR,SIGMA,X,DX)
  215. INPUT:    XBAR (REAL*4) mean
  216.           SIGMA (REAL*4) standard deviation
  217.           X (REAL*4) independent variable
  218.           DX (REAL*4) increment in X (if you want to know the
  219.           probability of 0,5,10,15,20,25,...,95,100%, then X=0,5,10,...
  220.           and DX=5)
  221. OUTPUT:   F (REAL*4) probability in %
  222.  
  223.  
  224. NAME:     FRF
  225. PURPOSE:  cubic error function
  226. TYPE:     REAL*4 function (far external)
  227. SYNTAX:   F=FRF(X)
  228. INPUT:    X (REAL*4)
  229. OUTPUT:   F (REAL*4)
  230. NOTE:     FRF is similar to ERF and also varies from -1 to 1 as X varies
  231.           from -infinity to +infinity, it pops up in some problems like
  232.           the error function (e.g. statistical thermodynamics)
  233.  
  234.  
  235. NAME:     FTC95
  236. PURPOSE:  Student's T-distribution for 95% confidence
  237. TYPE:     REAL*4 function (far external)
  238. SYNTAX:   F=FTC95(